# ----------------------------------------------------------------------------------------------------------
# Copyright (c) 2025 Huawei Technologies Co., Ltd.
# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
# CANN Open Software License Agreement Version 2.0 (the "License").
# Please refer to the License for details. You may not use this file except in compliance with the License.
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
# See LICENSE in the root of the software repository for the full text of the License.
# ----------------------------------------------------------------------------------------------------------
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/@STATIC_TARGET_NAME@-targets.cmake")

set(@STATIC_TARGET_NAME@_DEP_LIB_DIR "$ENV{ASCEND_HOME_PATH}"
    CACHE PATH "依赖库的链接目录（来自环境变量）")

if(NOT @STATIC_TARGET_NAME@_DEP_LIB_DIR)
    message(WARNING "环境变量 MYLIB_DEP_LIB_DIR 未设置，可能导致链接失败")
endif()

target_link_directories(@STATIC_TARGET_NAME@::@STATIC_TARGET_NAME@
    INTERFACE ${@STATIC_TARGET_NAME@_DEP_LIB_DIR})

set_target_properties(@STATIC_TARGET_NAME@::@STATIC_TARGET_NAME@ PROPERTIES
  INTERFACE_LINK_DIRECTORIES "${@STATIC_TARGET_NAME@_DEP_LIB_DIR}/lib64")
